With the continuous development of information technologies, people have higher and higher requirements on image quality. It is commonly known that in a process of obtaining an image, the image may be caused to be not clear under the influence of various factors such as an image-shooting device and illumination. Therefore, in order to ensure that people can view a clear image, enhancement processing needs to be performed on the image. This may improve contrast of the image by effectively compressing a dynamic range of the image, thereby improving image quality.
American physicist Edwin Land proposed the Retinex theory based on color constancy, which holds that color, which is perceived by a human being, of an object is closely related to a reflection property of a surface of the object and is not affected by an uncertain factor such as the intensity of a light source or non-uniform illumination. In the prior art, a multi-scale color enhancement solution based on color constancy is proposed. A fundamental principle of this solution is that: a luminance component is extracted from an original image; multi-scale Gaussian filtering is performed on the luminance component of the original image to obtain an illumination component of the original image, so that a reflection component of the original image is isolated; then, a luminance enhancement ratio is obtained according to the reflection component and the luminance component; and eventually, three color channels of the original image are multiplied respectively by the luminance enhancement ratio to obtain an enhanced image.
In a process of implementing the image enhancement described above, the inventor finds that the prior art has at least the following problem: The enhancement on the image is implemented by multiplying the three color channels of the original image respectively by the luminance enhancement ratio. However, this causes a region having high luminance in the original image to be too bright, and therefore, a condition of over enhancement occurs; moreover, certain detailed information of this part may be lost, and a region having low luminance in the original image may also be caused to have a large amount of noise.